//读写cookie函数
function SetCookie() {
    if (window.localStorage) {
        if (arguments.length == 1) { //传一个参数是，获取值
            return localStorage.getItem(arguments[0]);
        } else {
            if (arguments.length == 2) { //传二个参数是，设定值
                localStorage.removeItem(arguments[0]);
                return localStorage.setItem(arguments[0], arguments[1]);
            }
        }
    } else {
        alert('。不支持localStorage！');
    }
}

function clearCookie(n) {
    //删除本地缓存，n=名称，为空则删除所有
    if (window.localStorage) {
        if (n) {
            return localStorage.removeItem(n);
        } else {
            localStorage.clear();
        }
    } else {
        alert('不支持localStorage！');
    }
}
//**********打开网址******************
function openUrl(url){
    if(uexWidgetOne.getPlatform()=='0'){
        //IOS设备
        uexWidget.loadApp(url,'','');
    }else{
        //android设备
        uexWidget.loadApp('android.intent.action.VIEW','text/html',url);
    }  
}